[32on64] Copy the right grant table status code back to the guest.
authorIan Campbell <ian.campbell@xensource.com>
Mon, 6 Aug 2007 12:19:44 +0000 (13:19 +0100)
committerIan Campbell <ian.campbell@xensource.com>
Mon, 6 Aug 2007 12:19:44 +0000 (13:19 +0100)
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
xen/common/compat/grant_table.c

index 342e35622da4ece761fb076b66c5212a33f7b127..882d435a657ee712db8afccb801d2f387218f58f 100644 (file)
@@ -161,7 +161,7 @@ int compat_grant_table_op(unsigned int cmd,
                 while ( n-- )
                 {
                     guest_handle_add_offset(xfer, -1);
-                    if ( __copy_field_to_guest(xfer, nat.xfer, status) )
+                    if ( __copy_field_to_guest(xfer, nat.xfer + n, status) )
                         rc = -EFAULT;
                 }
             }
@@ -199,7 +199,7 @@ int compat_grant_table_op(unsigned int cmd,
                 while ( n-- )
                 {
                     guest_handle_add_offset(copy, -1);
-                    if ( __copy_field_to_guest(copy, nat.copy, status) )
+                    if ( __copy_field_to_guest(copy, nat.copy + n, status) )
                         rc = -EFAULT;
                 }
             }